# -*- coding: utf-8 -*-
from common.admin import db as user_db


def add_query_fliter(req, query_dct, mch_id_str='mch_id'):
    t, count = user_db.get_mchids_filter_by_user(req.user_id)
    if count > 0:
        query_dct[mch_id_str] = t
